console.log("= = = = = use for = = = = =");

for (let l = 1; l <= 9; l++) {
  let lines = [];
  for (let r = 1; r <= l; r++) {
    lines.push(`${r}x${l}=${l * r}`);
  }
  console.log(lines.join(" "));
}

console.log("= = = = = use while = = = = =");

let l = 1;
while (l <= 9) {
  let lines = [];
  let r = 1;
  while ( r <= l) {
    lines.push(`${r}x${l}=${l * r}`);
    r++
  }
  console.log(lines.join(" "));
  l++
}